<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>libnetconf: NETCONF Event Notifications (libxml2)</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../libnetconf-logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">libnetconf
   &#160;<span id="projectnumber">0.10.0-146_trunk</span>
   </div>
   <div id="projectbrief">NETCONF Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="../../modules.html"><span>Modules</span></a></li>
      <li><a href="../../annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('db/dae/group__notifications__xml.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">NETCONF Event Notifications (libxml2)</div>  </div>
</div><!--header-->
<div class="contents">

<p>libnetconf's implementation of NETCONF asynchronous message delivery as defined in RFC 5277. These functions accepts selected parameters as libxml2 structures.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga21824f1e804eed5f8907eefdd9d03a85"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/dae/group__notifications__xml.html#ga21824f1e804eed5f8907eefdd9d03a85">ncxmlntf_event_new</a> (time_t etime, <a class="el" href="../../da/d54/group__notifications.html#gadcf8c532762d57f7d9a5491e6abb9977">NCNTF_EVENT</a> event,...)</td></tr>
<tr class="memdesc:ga21824f1e804eed5f8907eefdd9d03a85"><td class="mdescLeft">&#160;</td><td class="mdescRight">Store a new event into the specified stream. Parameters are specific for different events.  <a href="#ga21824f1e804eed5f8907eefdd9d03a85">More...</a><br/></td></tr>
<tr class="separator:ga21824f1e804eed5f8907eefdd9d03a85"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae1d3152a18bb5d030f9d42d62658986c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../da/d54/group__notifications.html#ga3c2f8ca237327fcf3c871544f414bdfe">nc_ntf</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/dae/group__notifications__xml.html#gae1d3152a18bb5d030f9d42d62658986c">ncxmlntf_notif_create</a> (time_t event_time, const xmlNodePtr content)</td></tr>
<tr class="memdesc:gae1d3152a18bb5d030f9d42d62658986c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new &lt;notification&gt; message with the given eventTime and content.  <a href="#gae1d3152a18bb5d030f9d42d62658986c">More...</a><br/></td></tr>
<tr class="separator:gae1d3152a18bb5d030f9d42d62658986c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga26fc8f89287a14cc1da067d9aeb92fdf"><td class="memItemLeft" align="right" valign="top">xmlNodePtr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/dae/group__notifications__xml.html#ga26fc8f89287a14cc1da067d9aeb92fdf">ncxmlntf_notif_get_content</a> (<a class="el" href="../../da/d54/group__notifications.html#ga3c2f8ca237327fcf3c871544f414bdfe">nc_ntf</a> *notif)</td></tr>
<tr class="memdesc:ga26fc8f89287a14cc1da067d9aeb92fdf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the description of the event reported in the notification message.  <a href="#ga26fc8f89287a14cc1da067d9aeb92fdf">More...</a><br/></td></tr>
<tr class="separator:ga26fc8f89287a14cc1da067d9aeb92fdf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>libnetconf's implementation of NETCONF asynchronous message delivery as defined in RFC 5277. These functions accepts selected parameters as libxml2 structures. </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga21824f1e804eed5f8907eefdd9d03a85"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ncxmlntf_event_new </td>
          <td>(</td>
          <td class="paramtype">time_t&#160;</td>
          <td class="paramname"><em>etime</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../da/d54/group__notifications.html#gadcf8c532762d57f7d9a5491e6abb9977">NCNTF_EVENT</a>&#160;</td>
          <td class="paramname"><em>event</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Store a new event into the specified stream. Parameters are specific for different events. </p>
<h3>Event parameters:</h3>
<ul>
<li><a class="el" href="../../da/d54/group__notifications.html#ggadcf8c532762d57f7d9a5491e6abb9977a1f1e3c2032baf2542b06052243bd42c9">NCNTF_GENERIC</a><ul>
<li><b>const xmlNodePtr content</b> Content of the notification as defined in RFC 5277. eventTime is added automatically. The parameter can be a single XML node as well as a node list.</li>
</ul>
</li>
<li><a class="el" href="../../da/d54/group__notifications.html#ggadcf8c532762d57f7d9a5491e6abb9977a9cf730f96784afdb8d783df8dacfab21">NCNTF_BASE_CFG_CHANGE</a><ul>
<li><a class="el" href="../../db/d67/group__store.html#ga5e4b9ee138b963e8ea2354fef2ebbe73" title="Enumeration of the supported types of datastores defined by NETCONF. ">NC_DATASTORE</a> <b>datastore</b> Specify which datastore has changed.</li>
<li><a class="el" href="../../da/d54/group__notifications.html#ga1e9d948b3807d679482c737da720477d" title="Enumeration of the possible source of events. ">NCNTF_EVENT_BY</a> <b>changed_by</b> Specify the source of the change.<ul>
<li>If the value is set to <a class="el" href="../../da/d54/group__notifications.html#gga1e9d948b3807d679482c737da720477dab20423755c56c213cd2567b2bbf1f9c2">NCNTF_EVENT_BY_USER</a>, the following parameter is required:</li>
</ul>
</li>
<li><b>const struct nc_session* session</b> Session that required the configuration change.</li>
</ul>
</li>
<li><a class="el" href="../../da/d54/group__notifications.html#ggadcf8c532762d57f7d9a5491e6abb9977af6adea71e2edc918ae1f7ade6f11ca59">NCNTF_BASE_CPBLT_CHANGE</a><ul>
<li><b>const struct nc_cpblts* old</b> Old list of capabilities.</li>
<li><b>const struct nc_cpblts* new</b> New list of capabilities.</li>
<li><a class="el" href="../../da/d54/group__notifications.html#ga1e9d948b3807d679482c737da720477d" title="Enumeration of the possible source of events. ">NCNTF_EVENT_BY</a> <b>changed_by</b> Specify the source of the change.<ul>
<li>If the value is set to <a class="el" href="../../da/d54/group__notifications.html#gga1e9d948b3807d679482c737da720477dab20423755c56c213cd2567b2bbf1f9c2">NCNTF_EVENT_BY_USER</a>, the following parameter is required:</li>
</ul>
</li>
<li><b>const struct nc_session* session</b> Session that required the configuration change.</li>
</ul>
</li>
<li><a class="el" href="../../da/d54/group__notifications.html#ggadcf8c532762d57f7d9a5491e6abb9977a7e0ecf6ec462565f5bc9a1edfd7d4c6c">NCNTF_BASE_SESSION_START</a><ul>
<li><b>const struct nc_session* session</b> Started session (<a class="el" href="../../db/d52/group__session.html#gga9fba5da8e4c50d2427d0d24e8e7b630ca3a417a51dfb315ebb7d1427357a838b2">NC_SESSION_STATUS_DUMMY</a> session is also allowed).</li>
</ul>
</li>
<li><a class="el" href="../../da/d54/group__notifications.html#ggadcf8c532762d57f7d9a5491e6abb9977a1c06188153af81757d0ba8aac0768550">NCNTF_BASE_SESSION_END</a><ul>
<li><b>const struct nc_session* session</b> Finished session (<a class="el" href="../../db/d52/group__session.html#gga9fba5da8e4c50d2427d0d24e8e7b630ca3a417a51dfb315ebb7d1427357a838b2">NC_SESSION_STATUS_DUMMY</a> session is also allowed).</li>
<li><a class="el" href="../../db/d52/group__session.html#gab8fb6ff96d652b9aeb1223729e5694c2" title="Enumeration of reasons of the NETCONF session termination as defined in RFC 6470. ...">NC_SESSION_TERM_REASON</a> <b>reason</b> Session termination reason.<ul>
<li>If the value is set to <a class="el" href="../../db/d52/group__session.html#ggab8fb6ff96d652b9aeb1223729e5694c2ad43b0471a6cc0e281bc7eb135a59da00">NC_SESSION_TERM_KILLED</a>, the following parameter is required.</li>
</ul>
</li>
<li><b>const char* killed-by-sid</b> The ID of the session that directly caused the session termination. If the session was terminated by a non-NETCONF process unknown to the server, use NULL as the value.</li>
</ul>
</li>
</ul>
<h3>Examples:</h3>
<ul>
<li>ncxmlntf_event_new("mystream", -1, NCNTF_GENERIC, my_xml_data);</li>
<li>ncxmlntf_event_new("netconf", -1, NCNTF_BASE_CFG_CHANGE, NC_DATASTORE_RUNNING, NCNTF_EVENT_BY_USER, my_session);</li>
<li>ncxmlntf_event_new("netconf", -1, NCNTF_BASE_CPBLT_CHANGE, old_cpblts, new_cpblts, NCNTF_EVENT_BY_SERVER);</li>
<li>ncxmlntf_event_new("netconf", -1, NCNTF_BASE_SESSION_START, my_session);</li>
<li>ncxmlntf_event_new("netconf", -1, NCNTF_BASE_SESSION_END, my_session, NC_SESSION_TERM_KILLED, "123456");</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">etime</td><td>Time of the event, if set to -1, the current time is used. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">event</td><td>Event type to distinguish the following parameters. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">...</td><td>Specific parameters for different event types as described above. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 for success, non-zero value else. </dd></dl>

</div>
</div>
<a class="anchor" id="gae1d3152a18bb5d030f9d42d62658986c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../da/d54/group__notifications.html#ga3c2f8ca237327fcf3c871544f414bdfe">nc_ntf</a>* ncxmlntf_notif_create </td>
          <td>(</td>
          <td class="paramtype">time_t&#160;</td>
          <td class="paramname"><em>event_time</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const xmlNodePtr&#160;</td>
          <td class="paramname"><em>content</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new &lt;notification&gt; message with the given eventTime and content. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">event_time</td><td>Time of the event. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">content</td><td>Description of the event in XML. This parameter is taken as a node list, so the sibling nodes will be also included. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Created notification message. </dd></dl>

</div>
</div>
<a class="anchor" id="ga26fc8f89287a14cc1da067d9aeb92fdf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">xmlNodePtr ncxmlntf_notif_get_content </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../da/d54/group__notifications.html#ga3c2f8ca237327fcf3c871544f414bdfe">nc_ntf</a> *&#160;</td>
          <td class="paramname"><em>notif</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the description of the event reported in the notification message. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">notif</td><td>Notification message. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Copy of the event description content (single node or node list, eventTime is not included). The caller is supposed to free the returned structure with xmlFreeNodeList(). </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Fri Apr 15 2016 09:20:09 for libnetconf by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
